<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@include file="/common/definition.jsp"%>

<html:html>
<tiles:insert beanName="shop-definition" flush="true">
	<tiles:put name="title"> Quản Lý Hình Ảnh Sản Phẩm </tiles:put>
	<tiles:put name="body" type="string">
		<div class="container">
			<s:form action="addProductImage" theme="simple" enctype="multipart/form-data">
				<h1>Image Management Page</h1>
				<div class="row" style="padding-top: 10px">
					<h5 class="text-success" style="padding-left: 30px">
						<s:property value="productInfo.catName" />
						<s:property value="productInfo.brandName" />
						<s:property value="productInfo.productName" />
					</h5>
					<s:iterator value="productModel.productInfo.listLinkImg">
						<div class="col-md-2">
							<img width=100% height=150px src='<s:property/>'>
							<div class="caption">
								<h5 class="text-center text-success">
									<s:property value="catName" />
									<s:property value="brandName" />
									<s:property value="productName" />
								</h5>
								<s:a action="deleteProductImg"
									onclick="this.addProductImage.reset();">
									<p class="text-danger">Xóa hình</p>
									<s:param name="linkImg">
										<s:property />
									</s:param>
									<s:param name="productID">
										<s:property value="productInfo.productID" />
									</s:param>
								</s:a>
							</div>
						</div>
					</s:iterator>
					<s:iterator value="productModel.listFileSubmit">
						<div class="col-md-2">
							<img width=100% height=150px src="img/avatar/no_product_img.jpg">
							<s:file name="imgUpload"/>
						</div>
					</s:iterator>

				</div>
				<s:hidden name="productID" value="%{productInfo.productID}" />
				<div class="form-group">
					<div class="col-sm-offset-8 col-sm-4" style="padding-top: 15px">
						<button type="submit" class="btn btn-primary btn-sm">
							Xác Nhận
						</button>
						<button type="reset" class="btn btn-default btn-sm">Nhập
							lại</button>
					</div>
				</div>
			</s:form>
		</div>
	</tiles:put>
</tiles:insert>
</html:html>
